home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / programm.ing / cpp112.zoo / cpp.man < prev    next >
Encoding:
Text File  |  1994-07-07  |  12.9 KB  |  331 lines

  1.  
  2.  
  3.  
  4.  
  5. CPP (1)                       30 May 1993                        CPP (1)
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15. pNAMEq pq pq pq pq pq pq pq pq 
  16.  
  17.         cpp - a stand-alone C preprocessor 
  18.  
  19.  
  20.  
  21. pSYNOPSISq pq pq pq pq pq pq pq pq 
  22.  
  23.         pcppq [ p-CTVq ] [ p-Pq[012]pqpq ] [ p-Dqnamepqpq ] 
  24.  
  25.              [ p-Dqnamep=qdefpq ] [ p-Iqdirectorypqpq ] [ p-Uqnamepqpq ] 
  26.  
  27.              [ p-ansiq ] [ p-fq[no-]pc++-commentsqpq ] [ p-Wq[no-]pbad-charsqpq ] 
  28.  
  29.              [  p-Wq[no-]pnested-commentsqpq  ] [ p-Wq[no-]pbad-concat-tokensqpq ] [
  30.  
  31.         pinput-fileq [ poutput-fileq ] ] 
  32.  
  33.  
  34.  
  35. pDESCRIPTIONq pq pq pq pq pq pq pq pq 
  36.  
  37.  
  38.  
  39.         pcppq is a stand-alone C preprocessor, intended  for  use  with  C
  40.  
  41.         compilers   such   as  HSC  which  do  not  provided  access  to
  42.  
  43.         preprocessor output.  It implements as closely  as  possible  an
  44.  
  45.         ANSI standard C preprocessor, including trigraphs, token pasting 
  46.  
  47.         and stringizing.  
  48.  
  49.  
  50.  
  51.         pcppq optionally  accepts  two filenames as arguments.  pinput-fileq
  52.  
  53.         and poutput-fileq are, respectively, the input  and  output  files
  54.  
  55.         for the  preprocessor.    If  not specified, or if given as `-',
  56.  
  57.         they default to the standard  input  and  the  standard  output,
  58.  
  59.         respectively.  
  60.  
  61.  
  62.  
  63. pOPTIONSq pq pq pq pq pq pq pq pq 
  64.  
  65.  
  66.  
  67.         p-Cq  
  68.  
  69.                 Pass  all  comments  (except  those  that appear on  pcppq
  70.  
  71.                 directive lines) through the preprocessor.  By  default,
  72.  
  73.                 pcppq strips out C-style comments.  
  74.  
  75.  
  76.  
  77.         p-Pq[012]  
  78.  
  79.                 Preprocess  the input without producing the line control
  80.  
  81.                 information used by the next pass of the C compiler.   A
  82.  
  83.                 numeric  argument  can be passed to -P: 0 specifies that
  84.  
  85.                 no line control information control is generated, and is 
  86.  
  87.                 equivalent to -P; 1 specifies that normal  line  control
  88.  
  89.                 information  is  generated,  which is the default; and 2
  90.  
  91.                 specifies that line control information is generated  in
  92.  
  93.                 the form of preprocessor  p#lineq directives.  
  94.  
  95.  
  96.  
  97.         p-Tq  
  98.  
  99.                 Translate trigraphs in the input file.  This behavior is 
  100.  
  101.                 implied by the p-ansiq option.  
  102.  
  103.  
  104.  
  105.         p-Dq name  
  106.  
  107.                 Define  pnameq  as  1  (one).    This  is the same as if a
  108.  
  109.                 p-Dqnamep=1qpq option appeared on the  pcppq command line, or as 
  110.  
  111.                 if a 
  112.  
  113.  
  114.  
  115.          
  116.  
  117.                 p#defineq name p1qpq 
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127. Thu Jul 7 22:27:55 1994                                           Page 1
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137. CPP (1)                       30 May 1993                        CPP (1)
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.          
  146.  
  147.                 line  appeared  in  the  source  file  that     pcppq   is
  148.  
  149.                 processing.  
  150.  
  151.  
  152.  
  153.         p-Dqnamep=qdef  
  154.  
  155.                 Define pnameq  as  if by a p#defineq directive.  This is the
  156.  
  157.                 same as if a 
  158.  
  159.  
  160.  
  161.          
  162.  
  163.                 p#defineq name pdefqpq 
  164.  
  165.  
  166.  
  167.          
  168.  
  169.                 line  appeared  in  the  source  file  that     pcppq   is
  170.  
  171.                 processing.  The p-Dq option has lower precedence than the 
  172.  
  173.                 p-Uq  option;  that is, if the same name is used in both a
  174.  
  175.                 p-Uq option and a p-Dq option, the name  will  be  undefined
  176.  
  177.                 regardless of the order of the options.  
  178.  
  179.  
  180.  
  181.         p-Iqdirectory  
  182.  
  183.                 Insert    pdirectoryq  into  the  search path for p#includeq
  184.  
  185.                 files with names not beginning with q`p/q', `p\q´,pq or a drive 
  186.  
  187.                 specifier.  pdirectoryq is inserted ahead of the  standard
  188.  
  189.                 list of  ``include''  directories.  Thus, p#includeq files
  190.  
  191.                 with names enclosed in double-quotes  (p"q)  are  searched
  192.  
  193.                 for first in the directory of the file with the p#includeq 
  194.  
  195.                 line,  then  in  directories  named with p-Iq options, and
  196.  
  197.                 lastly, in directories from  the  standard  list.    For
  198.  
  199.                 p#includeq  files  with  names  enclosed in angle-brackets
  200.  
  201.                 q(p<>q),pqpq the directory of the file with the  p#includeq  line
  202.  
  203.                 is not  searched.   See pUSAGEq below for exact details of
  204.  
  205.                 this search order.  
  206.  
  207.  
  208.  
  209.         p-Sq[filename]  
  210.  
  211.                 Specify an alternate configuration file.  If pfilenameq is 
  212.  
  213.                 present, the specified  file  is  read  instead  of  the
  214.  
  215.                 default  configuration  file; if pfilenameq is absent, the
  216.  
  217.                 default configuration file is  simply  not  read.    See
  218.  
  219.                 pUSAGEq below for further details.  
  220.  
  221.  
  222.  
  223.         p-Uqname  
  224.  
  225.                 Remove  any  initial definition of pnameq,pqpq where pnameq is a
  226.  
  227.                 symbol that is predefined by the preprocessor.  
  228.  
  229.  
  230.  
  231.         p-Vq  
  232.  
  233.                 Print version information to pstderrq.pqpq 
  234.  
  235.  
  236.  
  237.         p-ansiq  
  238.  
  239.                 Define the preprocessor token p__STDC__q to have value  1,
  240.  
  241.                 and enable   trigraph  translation.    To  get  p__STDC__q
  242.  
  243.                 without  trigraph  translation,  you  can  specify   the
  244.  
  245.                 options p-ansiq p-Tq.pqpq 
  246.  
  247.  
  248.  
  249.         The  following  p-fq and p-Wq options can be negated by adding a pno-q
  250.  
  251.         before the option name.  Some are on by default.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259. Thu Jul 7 22:27:55 1994                                           Page 2
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269. CPP (1)                       30 May 1993                        CPP (1)
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.         p-fc++-commentsq  
  278.  
  279.                 Support the C++ comment indicator q`p//q´.pqpq With this option 
  280.  
  281.                 active, everything on the line after the p//q  is  treated
  282.  
  283.                 as a comment.  Off by default.  
  284.  
  285.  
  286.  
  287.         p-Wbad-charsq  
  288.  
  289.                 Issue  a  warning  if  a  character  that cannot legally
  290.  
  291.                 appear in a C program appears  in  the  input.    On  by
  292.  
  293.                 default.  
  294.  
  295.  
  296.  
  297.         p-Wnested-commentsq  
  298.  
  299.                 Issue  a  warning  if a comment-start character sequence
  300.  
  301.                 q(`p/*q´,pqpq and q`p//q´pqpq if p-fc++-commentsq is active) appears  in
  302.  
  303.                 a comment.  Off by default.  
  304.  
  305.  
  306.  
  307.         p-Wbad-concat-tokensq  
  308.  
  309.                 Issue  a  warning if the token concatenation operator ##
  310.  
  311.                 produces an illegal C token.  On by default.  
  312.  
  313.  
  314.  
  315.         Options beginning with p-Xq are for specialized interactions  with
  316.  
  317.         particular  programs,  and  should    not  generally  be invoked
  318.  
  319.         directly by the user.  The following such options are  currently
  320.  
  321.         recognized: 
  322.  
  323.  
  324.  
  325.         p-Xfluffq  
  326.  
  327.                 This   option  is  used  by  the  pfluffq(1)pqpq  source  code
  328.  
  329.                 checker.  It causes the preprocessor token p__FLUFF__q  to
  330.  
  331.                 be defined,  and  enables  certain related pragmas.  See
  332.  
  333.                 the pfluffq(1)pqpq documentation for further information.  
  334.  
  335.  
  336.  
  337. pUSAGEq pq pq pq pq pq pq pq pq 
  338.  
  339.         If you are familiar with C, you should already  know  about  the
  340.  
  341.         basic   workings  of  pcppq.pqpq  We  will  not  go  into  a  detailed
  342.  
  343.         description here, since any good book  on  C  could  do  better;
  344.  
  345.         instead,   we   will   describe   details   particular  to  this
  346.  
  347.         implementation.  
  348.  
  349.  
  350.  
  351.         ppDirectory Search Orderqq pq pq pq pq pq pq pq pq 
  352.  
  353.  
  354.  
  355.  
  356.  
  357.         A file specified in an p#includeq directive will be  searched  for
  358.  
  359.         in the following directories, in order: 
  360.  
  361.  
  362.  
  363.         1.  
  364.  
  365.                 The  directory  of  the file that contains the  p#includeq
  366.  
  367.                 directive, if the directive is  of  the  form  `p#includeq
  368.  
  369.                 "filename"'.  
  370.  
  371.  
  372.  
  373.         2.  
  374.  
  375.                 The  directories  specified  by p-Iq options, in the order
  376.  
  377.                 they were specified.  
  378.  
  379.  
  380.  
  381.         3.  
  382.  
  383.                 The  list  of  directories  specified  in  the   pINCLUDEq
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391. Thu Jul 7 22:27:55 1994                                           Page 3
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401. CPP (1)                       30 May 1993                        CPP (1)
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.                 environment variable, in order.  
  410.  
  411.  
  412.  
  413.         ppSpecial Namesqq pq pq pq pq pq pq pq pq 
  414.  
  415.  
  416.  
  417.  
  418.  
  419.         The following macros are predefined by pcppq:pqpq 
  420.  
  421.  
  422.  
  423.         p__STDC__q  
  424.  
  425.                 Expands to 1 if the p-ansiq option is specified.  
  426.  
  427.  
  428.  
  429.         p__LINE__q  
  430.  
  431.                 Expands  to an integer constant representing the current
  432.  
  433.                 line number in the current input file.  
  434.  
  435.  
  436.  
  437.         p__FILE__q  
  438.  
  439.                 Expands to a string constant representing  the  name  of
  440.  
  441.                 the current input file.  
  442.  
  443.  
  444.  
  445.         p__DATE__q  
  446.  
  447.                 Expands  to  a string constant of the form "Mmm dd yyyy"
  448.  
  449.                 representing  the  date  on  which   preprocessing   was
  450.  
  451.                 initiated.  
  452.  
  453.  
  454.  
  455.         p__TIME__q  
  456.  
  457.                 Expands  to  a  string  constant  of the form "hh:mm:ss"
  458.  
  459.                 representing the system time at which preprocessing  was
  460.  
  461.                 initiated.  
  462.  
  463.  
  464.  
  465.         p__INCLUDE_LEVEL__q  
  466.  
  467.                 Expands  to an integer constant representing the current
  468.  
  469.                 depth of nested p#includeq files.  
  470.  
  471.  
  472.  
  473.         ppConfiguration filesqq pq pq pq pq pq pq pq pq 
  474.  
  475.  
  476.  
  477.  
  478.  
  479.         pcppq uses a configuration file to set up site-specific predefined 
  480.  
  481.         macros.  By  default,  the  directories  specified  in  the  pLIBq
  482.  
  483.         environment   variable  are  searched  in  order  for  the  file
  484.  
  485.         pcpp_defs.hq;pqpq an alternate file can be specified from the  command
  486.  
  487.         line with the p-Sq option.  
  488.  
  489.  
  490.  
  491.         The  configuration  file  is read just like a normal input file,
  492.  
  493.         except that text  other  than  preprocessor  directives  is  not
  494.  
  495.         passed through  to  the output file.  Normally the configuration
  496.  
  497.         file will contain only comments and preprocessor directives.  In 
  498.  
  499.         addition,  two  special  pragmas  are  recognized   within   the
  500.  
  501.         configuration file only: 
  502.  
  503.  
  504.  
  505.         #pragma CPP_cmdline_arg poptionq  
  506.  
  507.                 The  single  token  poptionq is processed as though it had
  508.  
  509.                 appeared as a command-line option.  The  option  may  be
  510.  
  511.                 undone  from  the  command  line,  except  as  indicated
  512.  
  513.                 below.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523. Thu Jul 7 22:27:55 1994                                           Page 4
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533. CPP (1)                       30 May 1993                        CPP (1)
  534.  
  535.  
  536.  
  537.  
  538.  
  539.  
  540.  
  541.         #pragma CPP_delayed  
  542.  
  543.                 Normally, the configuration  file  is  processed  before
  544.  
  545.                 command-line   options   are  processed,  to  allow  the
  546.  
  547.                 commands  therein  to  be  overridden  by   command-line
  548.  
  549.                 options.   This  pragma  causes  the  command line to be
  550.  
  551.                 processed before the remainder  of  the  file,  allowing
  552.  
  553.                 conditional  setup  based  on  parameters  set  from the
  554.  
  555.                 command line.    Note   that   macro   definitions   and
  556.  
  557.                 command-line   specifications  made  after  this  pragma
  558.  
  559.                 cannot be undone from the command line.  
  560.  
  561.  
  562.  
  563.         For example, the  following  configuration  file  activates  C++
  564.  
  565.         comments  by  default,  and sets the macro p_PROTO()q according to
  566.  
  567.         the presence of the p-ansiq option: 
  568.  
  569.         
  570.             #pragma CPP_cmdline_arg -fc++-comments
  571.             #pragma CPP_delayed
  572.             #ifdef __STDC__
  573.             #  define _PROTO(x) x
  574.             #else
  575.             #  define _PROTO(x) ()
  576.             #endif
  577.         
  578.  
  579.  
  580. pSEEq pALSOq pq pq pq pq pq pq pq 
  581.  
  582.         pfluffq(1)pqpq 
  583.  
  584.  
  585.  
  586.         Documentation for your C compiler 
  587.  
  588.  
  589.  
  590.         Any good book on C.  
  591.  
  592.  
  593.  
  594. pDIAGNOSTICSq pq pq pq pq pq pq pq pq 
  595.  
  596.  
  597.  
  598.         The  error  messages  produced  by  pcppq  are  intended   to   be
  599.  
  600.         self-explanatory.   The line number and filename where the error
  601.  
  602.         occurred are printed along with the diagnostic.  
  603.  
  604.  
  605.  
  606. pBUGSq pq pq pq pq pq pq pq pq 
  607.  
  608.         None that I know of, but there's almost always One More Bug(TM). 
  609.  
  610.         If you should find one, please report it to me, Scott Bigham, at 
  611.  
  612.         dsb@cs.duke.edu.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646. Thu Jul 7 22:27:55 1994                                           Page 5
  647.  
  648.  
  649.  
  650.  
  651.  
  652.